package com.sharing.mapper;

import com.sharing.backgroundmodule.dto.UserProductionHobby;
import com.sharing.domain.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author MingTian
 * @version 1.0
 * @description TODO
 * @date 2023/4/14 13:02
 */
@Mapper
public interface BrowseRecordMapper {
    Integer selectBrowseRecordNumByUserId(Integer userId);

    List<Integer> selectBrowseRecordsByUserId(Integer userId, Integer page, Integer size);

    List<BrowseRecord> selectBrowseRecordsByIds(List<Integer> ids);

    Integer insertBrowseRecord(BrowseRecord browseRecord);

    Integer deleteBrowseRecords(List<Integer> ids);

    Integer deleteBrowseRecordsByUser(List<Integer> ids);

    List<HotData<UserProduction>> selectHotProduction(String datetime, Integer page, Integer size);

    Integer selectHotProductionNum(String datetime);

    Integer selectHotUserNum(String datetime);

    List<HotData<User>> selectHotUser(String datetime, Integer page, Integer size);

    List<UserHobby> selectHotHobbyByUserIds(List<Integer> users, String format);

    List<UserProductionHobby> selectUserProductionHobbyByUserIdAndBeginDate(Integer userId, String begin);
}